﻿using DLL.Standard.Infrastructure;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;

namespace DLL.NET60.DB.MS.Entity.DTO
{
    /*DBFirst模式
     * 【Scaffold-DbContext "Server=localhost;Database=MagicDB;User ID=sa;Password=123456;" Microsoft.EntityFrameworkCore.SqlServer
     * -ContextDir DbContext
     * -OutputDir Models
     * -UseDatabaseNames
     * -Context ypfContext
     * -DataAnnotations
     * -Tables SysOperLogInfor,SysUserInfor
     * -Force】
     */

    [Serializable]
    public class DTO_adi_FlushParam : CNotifyPropertyChanged, ICloneable, IDeepCopy
    {
        [StringLength(255)]
        private string _DrugFlushParamCode;

        [StringLength(255)]
        private string _DrugFlushGroupCode;

        private int _LoopIndex = -1;
        private int _FlushMethod = 0;
        private float _OutLowOffset = 0;//抽出低位补偿
        private float _FlushOffsetHeight = 0;//冲刷高度补偿
        private int _DrugCountOfLoopFlush = 1;//每次循环配药的数量
        private int _FLUSH_COST1 = 3;
        private int _FLUSH_COST2 = 3;
        private int _FLUSH_COST3 = 3;
        private int _FLUSH_COST4 = 3;

        private float _SolventVolume = 12;
        private float _fzzFlushInVolume = 5;
        private float _fzzFlushOutVolume = 5;
        private float _IN_VOLUME = 5;
        private float _FlushOutVolume = 5;
        private float _FlushAdditionOutVolume = 0;
        private float _OUT_VOLUME = 5;
        private float _FlushOutWait = 1;
        private int _FlushInSpeed = 60;
        private int _FlushOutSpeed = 60;
        private int _FlushOutSlowSpeed = 10;

        private int _RePullCount = 1;
        private float _RePullOutVolume = 2;
        private int _RePullInSpeed = 60;
        private int _RePullOutSpeed = 10;
        private float _FLUSH_AIRE = 0;
        private int _FlushInAirSpeed = 60;
        private int _FlushOutAirSpeed = 80;
        private float _PUMPING_WAIT = 1;
        private float _RePullPumping_Wait = 1;
        private float _ADDITIONAL_PUMPING = 0;
        private float _AdditionalOutAirVolume = 1.5F;

        private int _BubbleFlushInSpeed = 30;//起泡冲刷速度
        private int _ViscosityFlushInSpeed = 10;//粘稠冲刷速度
        private float _ViscosityInVolume = 3;//粘稠冲刷容积
        private float _LastBottleAdditionOutVolume = 0;//最后一瓶多抽体积
        private int _FlushSolventPushBackSpeed = 80;
        private int _InjectorRinseCount = 1;
        private float _InjectorRinseVolume = 5;
        private int _EnableRoatBottle = 0;
        private float _FlushOutLastWait = 2;
        private float _FlushOutHeightOffset = 0;
        //一个循环冲配参数里面只有一个药
        public virtual DTO_adi_FlushGroup flushGroup { get; set; }

        [Key]
        [StringLength(255)]
        public string DrugFlushParamCode
        { get { return _DrugFlushParamCode; } set { _DrugFlushParamCode = value; this.OnPropertyChanged(); } }

        [StringLength(255)]
        public string DrugFlushGroupCode
        { get { return _DrugFlushGroupCode; } set { _DrugFlushGroupCode = value; this.OnPropertyChanged(); } }

        public int LoopIndex
        { get { return _LoopIndex; } set { _LoopIndex = value; this.OnPropertyChanged(); } }
        public int DrugCountOfLoopFlush
        { get { return _DrugCountOfLoopFlush; } set { _DrugCountOfLoopFlush = value; this.OnPropertyChanged(); } }
        public float OutLowOffset
        { get { return _OutLowOffset; } set { _OutLowOffset = value; this.OnPropertyChanged(); } }
        public float FlushOffsetHeight
        { get { return _FlushOffsetHeight; } set { _FlushOffsetHeight = value; this.OnPropertyChanged(); } }
        public int FLUSH_COST1
        { get { return _FLUSH_COST1; } set { _FLUSH_COST1 = value; this.OnPropertyChanged(); } }
        public int FLUSH_COST2
        { get { return _FLUSH_COST2; } set { _FLUSH_COST2 = value; this.OnPropertyChanged(); } }
        public int FLUSH_COST3
        { get { return _FLUSH_COST3; } set { _FLUSH_COST3 = value; this.OnPropertyChanged(); } }
        public int FLUSH_COST4
        { get { return _FLUSH_COST4; } set { _FLUSH_COST4 = value; this.OnPropertyChanged(); } }
        public int FlushMethod
        { get { return _FlushMethod; } set { _FlushMethod = value; this.OnPropertyChanged(); } }
        public float SolventVolume
        { get { return _SolventVolume; } set { _SolventVolume = value; this.OnPropertyChanged(); } }
        public float IN_VOLUME
        { get { return _IN_VOLUME; } set { _IN_VOLUME = value; this.OnPropertyChanged(); } }
        public float FlushOutVolume
        { get { return _FlushOutVolume; } set { _FlushOutVolume = value; this.OnPropertyChanged(); } }
        public float fzzFlushInVolume
        { get { return _fzzFlushInVolume; } set { _fzzFlushInVolume = value; this.OnPropertyChanged(); } }
        public float fzzFlushOutVolume
        { get { return _fzzFlushOutVolume; } set { _fzzFlushOutVolume = value; this.OnPropertyChanged(); } }
        public float OUT_VOLUME
        { get { return _OUT_VOLUME; } set { _OUT_VOLUME = value; this.OnPropertyChanged(); } }
        public float FlushAdditionOutVolume
        { get { return _FlushAdditionOutVolume; } set { _FlushAdditionOutVolume = value; this.OnPropertyChanged(); } }
        public float FlushOutWait
        { get { return _FlushOutWait; } set { _FlushOutWait = value; this.OnPropertyChanged(); } }
        public int FlushInSpeed
        { get { return _FlushInSpeed; } set { _FlushInSpeed = value; this.OnPropertyChanged(); } }
        public int FlushOutSpeed
        { get { return _FlushOutSpeed; } set { _FlushOutSpeed = value; this.OnPropertyChanged(); } }
        public int FlushOutSlowSpeed
        { get { return _FlushOutSlowSpeed; } set { _FlushOutSlowSpeed = value; this.OnPropertyChanged(); } }
        public int RePullCount
        { get { return _RePullCount; } set { _RePullCount = value; this.OnPropertyChanged(); } }
        public float RePullOutVolume
        { get { return _RePullOutVolume; } set { _RePullOutVolume = value; this.OnPropertyChanged(); } }
        public int RePullInSpeed
        { get { return _RePullInSpeed; } set { _RePullInSpeed = value; this.OnPropertyChanged(); } }
        public int RePullOutSpeed
        { get { return _RePullOutSpeed; } set { _RePullOutSpeed = value; this.OnPropertyChanged(); } }
        public float FLUSH_AIRE
        { get { return _FLUSH_AIRE; } set { _FLUSH_AIRE = value; this.OnPropertyChanged(); } }
        public int FlushInAirSpeed
        { get { return _FlushInAirSpeed; } set { _FlushInAirSpeed = value; this.OnPropertyChanged(); } }
        public int FlushOutAirSpeed
        { get { return _FlushOutAirSpeed; } set { _FlushOutAirSpeed = value; this.OnPropertyChanged(); } }
        public float PUMPING_WAIT
        { get { return _PUMPING_WAIT; } set { _PUMPING_WAIT = value; this.OnPropertyChanged(); } }

        //RePullPumping_Wait
        public float RePullPumping_Wait
        { get { return _RePullPumping_Wait; } set { _RePullPumping_Wait = value; this.OnPropertyChanged(); } }

        public float ADDITIONAL_PUMPING
        { get { return _ADDITIONAL_PUMPING; } set { _ADDITIONAL_PUMPING = value; this.OnPropertyChanged(); } }

        public float AdditionalOutAirVolume
        { get { return _AdditionalOutAirVolume; } set { _AdditionalOutAirVolume = value; this.OnPropertyChanged(); } }
        public int BubbleFlushInSpeed
        { get { return _BubbleFlushInSpeed; } set { _BubbleFlushInSpeed = value; this.OnPropertyChanged(); } }

        public int ViscosityFlushInSpeed
        { get { return _ViscosityFlushInSpeed; } set { _ViscosityFlushInSpeed = value; this.OnPropertyChanged(); } }
        public float ViscosityInVolume
        { get { return _ViscosityInVolume; } set { _ViscosityInVolume = value; this.OnPropertyChanged(); } }
        public float LastBottleAdditionOutVolume
        { get { return _LastBottleAdditionOutVolume; } set { _LastBottleAdditionOutVolume = value; this.OnPropertyChanged(); } }

        //FlushSolventPushBackSpeed
        public int FlushSolventPushBackSpeed
        { get { return _FlushSolventPushBackSpeed; } set { _FlushSolventPushBackSpeed = value; this.OnPropertyChanged(); } }

        public int InjectorRinseCount
        { get { return _InjectorRinseCount; } set { _InjectorRinseCount = value; this.OnPropertyChanged(); } }
        public float InjectorRinseVolume
        { get { return _InjectorRinseVolume; } set { _InjectorRinseVolume = value; this.OnPropertyChanged(); } }
        public int EnableRoatBottle
        { get { return _EnableRoatBottle; } set { _EnableRoatBottle = value; this.OnPropertyChanged(); } }

        public float FlushOutLastWait
        { get { return _FlushOutLastWait; } set { _FlushOutLastWait = value; this.OnPropertyChanged(); } }

        //FlushOutHeightOffset
        public float FlushOutHeightOffset
        { get { return _FlushOutHeightOffset; } set { _FlushOutHeightOffset = value; this.OnPropertyChanged(); } }

        public object Clone()
        {
            //浅复制，只可以复制值类型的变量，对医用类型的变量没用
            return this.MemberwiseClone();
        }

        public object DeepCopy()
        {
            return new DTO_adi_FlushParam() as object;//深复制
        }
    }

    /// <summary>
    /// 深拷贝接口
    /// </summary>
    internal interface IDeepCopy
    {
        object DeepCopy();
    }

    //Add-Migration
}